<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
	<Script file="PetPaperDollFrame.lua"/>
	<CheckButton name="CompanionButtonTemplate" inherits="SecureFrameTemplate" virtual="true">
		<Size>
			<AbsDimension x="37" y="37"/>
		</Size>
		<Layers>
			<Layer level="OVERLAY">
				<Texture name="$parentActiveTexture" file="Interface\Buttons\CheckButtonHilight" alphaMode="ADD"/>
			</Layer>
		</Layers>
		<Frames>
			<Cooldown name="$parentCooldown" inherits="CooldownFrameTemplate"/>
		</Frames>
		<Scripts>
			<OnLoad>
				CompanionButton_OnLoad(self);
			</OnLoad>
			<OnClick>
				if ( IsModifiedClick() ) then
					CompanionButton_OnModifiedClick(self, button);
				else
					CompanionButton_OnClick(self, button);
				end
				PlaySound("igMainMenuOptionCheckBoxOn");
			</OnClick>
			<OnDragStart>
				CompanionButton_OnDrag(self);
			</OnDragStart>
			<OnReceiveDrag>
				CompanionButton_OnDrag(self);
			</OnReceiveDrag>
			<OnEnter>
				CompanionButton_OnEnter(self)
			</OnEnter>
			<OnLeave>
				GameTooltip:Hide()
			</OnLeave>
		</Scripts>
		<DisabledTexture file="Interface\PetPaperDollFrame\UI-PetFrame-Slots-Mounts">
			<TexCoords left="0.203125" right="0.765625" top="0.203125" bottom="0.7625625"/>
		</DisabledTexture>
		<HighlightTexture name="$parentHighlight" file="Interface\Buttons\ButtonHilight-Square" alphaMode="ADD"/>
		<CheckedTexture file="Interface\Buttons\UI-Button-Outline" alphaMode="ADD">
			<Size>
				<AbsDimension x="66" y="66"/>
			</Size>
			<Anchors>
				<Anchor point="CENTER">
					<Offset>
						<AbsDimension x="0" y="0"/>
					</Offset>
				</Anchor>
			</Anchors>
		</CheckedTexture>
	</CheckButton>

	<Frame name="PetPaperDollFrame" setAllPoints="true" enableMouse="true" parent="CharacterFrame" id="2" hidden="true">
		<HitRectInsets>
			<AbsInset left="0" right="30" top="0" bottom="75"/>
		</HitRectInsets>
		<Layers>
			<Layer level="BACKGROUND">
				<FontString name="PetNameText" inherits="GameFontHighlight" hidden="true">
					<Size>
						<AbsDimension x="109" y="16"/>
					</Size>
					<Anchors>
						<Anchor point="CENTER">
							<Offset>
								<AbsDimension x="6" y="232"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<Texture file="Interface\PaperDollInfoFrame\UI-Character-General-TopLeft">
					<Size>
						<AbsDimension x="256" y="256"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="2" y="-1"/>
							</Offset>
						</Anchor>
					</Anchors>
				</Texture>
				<Texture file="Interface\PaperDollInfoFrame\UI-Character-General-TopRight">
					<Size>
						<AbsDimension x="128" y="256"/>
					</Size>
					<Anchors>
						<Anchor point="TOPRIGHT">
							<Offset>
								<AbsDimension x="2" y="-1"/>
							</Offset>
						</Anchor>
					</Anchors>
				</Texture>
				<Texture file="Interface\PetPaperDollFrame\UI-PetPaperDollFrame-BotLeft">
					<Size>
						<AbsDimension x="256" y="256"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="2" y="-257"/>
							</Offset>
						</Anchor>
					</Anchors>
				</Texture>
				<Texture file="Interface\PetPaperDollFrame\UI-PetPaperDollFrame-BotRight">
					<Size>
						<AbsDimension x="128" y="256"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="258" y="-257"/>
							</Offset>
						</Anchor>
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
		<Frames>
			<Frame name="PetPaperDollFramePetFrame" setAllPoints="true" enableMouse="true" hidden="false" id="1">
				<Layers>
					<Layer level="BACKGROUND">
						<FontString name="PetLevelText" inherits="GameFontNormalSmall" text="Level level race class">
							<Anchors>
								<Anchor point="CENTER" relativePoint="CENTER">
									<Offset>
										<AbsDimension x="0" y="-55"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Frames>
					<StatusBar name="PetPaperDollFrameExpBar" inherits="TextStatusBar">
						<Size>
							<AbsDimension x="319" y="11"/>
						</Size>
						<Anchors>
							<Anchor point="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="23" y="103"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Layers>
							<Layer level="OVERLAY">
								<Texture name="PetPaperDollXPBar1" file="Interface\MainMenuBar\UI-MainMenuBar-Dwarf">
									<Size>
										<AbsDimension x="160" y="13"/>
									</Size>
									<Anchors>
										<Anchor point="TOPLEFT">
											<Offset>
												<AbsDimension x="0" y="2"/>
											</Offset>
										</Anchor>
									</Anchors>
									<TexCoords left="0.203125" right="0.8046875" top="0.2890625" bottom="0.33984375"/>
								</Texture>
								<Texture file="Interface\MainMenuBar\UI-MainMenuBar-Dwarf">
									<Size>
										<AbsDimension x="159" y="13"/>
									</Size>
									<Anchors>
										<Anchor point="LEFT" relativeTo="PetPaperDollXPBar1" relativePoint="RIGHT">
											<Offset>
												<AbsDimension x="0" y="0"/>
											</Offset>
										</Anchor>
									</Anchors>
									<TexCoords left="0.203125" right="0.8046875" top="0.2890625" bottom="0.33984375"/>
								</Texture>
								<FontString name="PetPaperDollFrameExpBarText" inherits="TextStatusBarText">
									<Anchors>
										<Anchor point="CENTER">
											<Offset>
												<AbsDimension x="0" y="0"/>
											</Offset>
										</Anchor>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
						<Scripts>
							<OnLoad>
								TextStatusBar_Initialize(self);
								SetTextStatusBarText(self, PetPaperDollFrameExpBarText);
							</OnLoad>
							<OnEnter>
								TextStatusBar_UpdateTextString(self);
								ShowTextStatusBarText(self);
							</OnEnter>
							<OnLeave>
								HideTextStatusBarText(self);
							</OnLeave>
						</Scripts>
						<BarTexture file="Interface\TargetingFrame\UI-StatusBar"/>
						<BarColor r="0.58" g="0.0" b="0.55"/>
					</StatusBar>
					<PlayerModel name="PetModelFrame">
						<Size>
							<AbsDimension x="318" y="224"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset>
									<AbsDimension x="25" y="-78"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								Model_OnLoad(self);
								self:RegisterEvent("DISPLAY_SIZE_CHANGED");
							</OnLoad>
							<OnEvent>
								self:RefreshUnit();
							</OnEvent>
							<OnUpdate>
		                        Model_OnUpdate(self, elapsed);
		                    </OnUpdate>
						</Scripts>
						<Frames>
							<Button name="PetModelFrameRotateLeftButton">
								<Size>
									<AbsDimension x="35" y="35"/>
								</Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="PetPaperDollFrame">
										<Offset>
											<AbsDimension x="23" y="-76"/>
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self:RegisterForClicks("LeftButtonDown", "LeftButtonUp");
									</OnLoad>
									<OnClick>
										Model_RotateLeft(PetModelFrame);
									</OnClick>
								</Scripts>
								<NormalTexture file="Interface\Buttons\UI-RotationLeft-Button-Up"/>
								<PushedTexture file="Interface\Buttons\UI-RotationLeft-Button-Down"/>
								<HighlightTexture file="Interface\Buttons\ButtonHilight-Round" alphaMode="ADD"/>
							</Button>
							<Button name="PetModelFrameRotateRightButton">
								<Size>
									<AbsDimension x="35" y="35"/>
								</Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="PetModelFrameRotateLeftButton" relativePoint="TOPRIGHT"/>
								</Anchors>
								<Scripts>
									<OnLoad>
										self:RegisterForClicks("LeftButtonDown", "LeftButtonUp");
									</OnLoad>
									<OnClick>
										Model_RotateRight(PetModelFrame);
									</OnClick>
								</Scripts>
								<NormalTexture file="Interface\Buttons\UI-RotationRight-Button-Up"/>
								<PushedTexture file="Interface\Buttons\UI-RotationRight-Button-Down"/>
								<HighlightTexture file="Interface\Buttons\ButtonHilight-Round" alphaMode="ADD"/>
							</Button>
						</Frames>
					</PlayerModel>
					<Frame name="PetPaperDollPetInfo" enableMouse="true" hidden="false">
						<Size>
							<AbsDimension x="24" y="23"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="PetModelFrameRotateLeftButton">
								<Offset>
									<AbsDimension x="7" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Layers>
							<Layer level="BACKGROUND">
								<Texture file="Interface\PetPaperDollFrame\UI-PetHappiness" setAllPoints="true">
									<Size>
										<AbsDimension x="24" y="23"/>
									</Size>
									<TexCoords left="0" right="0.1875" top="0" bottom="0.359375"/>
								</Texture>
							</Layer>
						</Layers>
						<Scripts>
							<OnEnter>
								GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
								GameTooltip:SetText(format(PET_DIET_TEMPLATE, BuildListString(GetPetFoodTypes())));
							</OnEnter>
							<OnLeave>
								GameTooltip:Hide();
							</OnLeave>
						</Scripts>
					</Frame>
					<Button name="PetPaperDollCloseButton" inherits="UIPanelButtonTemplate" text="CLOSE">
						<Size>
							<AbsDimension x="80" y="22"/>
						</Size>
						<Anchors>
							<Anchor point="CENTER" relativePoint="TOPLEFT">
								<Offset>
									<AbsDimension x="305" y="-422"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnClick>
								HideUIPanel(CharacterFrame);
							</OnClick>
						</Scripts>
					</Button>
					<Frame name="PetAttributesFrame">
						<Size>
							<AbsDimension x="230" y="78"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset>
									<AbsDimension x="67" y="-320"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Layers>
							<Layer level="BACKGROUND">
								<Texture file="Interface\PaperDollInfoFrame\UI-Character-StatBackground">
									<Size>
										<AbsDimension x="114" y="78"/>
									</Size>
									<Anchors>
										<Anchor point="TOPLEFT">
											<Offset>
												<AbsDimension x="0" y="0"/>
											</Offset>
										</Anchor>
									</Anchors>
									<TexCoords left="0" right="0.89" top="0" bottom="0.61"/>
								</Texture>
								<Texture file="Interface\PaperDollInfoFrame\UI-Character-StatBackground">
									<Size>
										<AbsDimension x="114" y="78"/>
									</Size>
									<Anchors>
										<Anchor point="TOPLEFT">
											<Offset>
												<AbsDimension x="115" y="0"/>
											</Offset>
										</Anchor>
									</Anchors>
									<TexCoords left="0" right="0.89" top="0" bottom="0.61"/>
								</Texture>
							</Layer>
						</Layers>
						<Frames>
							<Frame name="PetStatFrame1" inherits="StatFrameTemplate" id="1">
								<Anchors>
									<Anchor point="TOPLEFT">
										<Offset>
											<AbsDimension x="6" y="-5"/>
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnEnter>
										PaperDollStatTooltip(self, "pet");
									</OnEnter>
									<OnLeave>
										GameTooltip:Hide();
									</OnLeave>
								</Scripts>
							</Frame>
							<Frame name="PetStatFrame2" inherits="StatFrameTemplate" id="2">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="PetStatFrame1" relativePoint="BOTTOMLEFT">
										<Offset>
											<AbsDimension x="0" y="-1"/>
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnEnter>
										PaperDollStatTooltip(self, "pet");
									</OnEnter>
									<OnLeave>
										GameTooltip:Hide();
									</OnLeave>
								</Scripts>
							</Frame>
							<Frame name="PetStatFrame3" inherits="StatFrameTemplate" id="3">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="PetStatFrame2" relativePoint="BOTTOMLEFT">
										<Offset>
											<AbsDimension x="0" y="-1"/>
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnEnter>
										PaperDollStatTooltip(self, "pet");
									</OnEnter>
									<OnLeave>
										GameTooltip:Hide();
									</OnLeave>
								</Scripts>
							</Frame>
							<Frame name="PetStatFrame4" inherits="StatFrameTemplate" id="4">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="PetStatFrame3" relativePoint="BOTTOMLEFT">
										<Offset>
											<AbsDimension x="0" y="-1"/>
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnEnter>
										PaperDollStatTooltip(self, "pet");
									</OnEnter>
									<OnLeave>
										GameTooltip:Hide();
									</OnLeave>
								</Scripts>
							</Frame>
							<Frame name="PetStatFrame5" inherits="StatFrameTemplate" id="5">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="PetStatFrame4" relativePoint="BOTTOMLEFT">
										<Offset>
											<AbsDimension x="0" y="-1"/>
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnEnter>
										PaperDollStatTooltip(self, "pet");
									</OnEnter>
									<OnLeave>
										GameTooltip:Hide();
									</OnLeave>
								</Scripts>
							</Frame>
							<Frame name="PetAttackPowerFrame" inherits="StatFrameTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="PetAttributesFrame" relativePoint="TOPLEFT">
										<Offset>
											<AbsDimension x="122" y="-5"/>
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnEnter>
										PaperDollStatTooltip(self, "pet");
									</OnEnter>
									<OnLeave>
										GameTooltip:Hide();
									</OnLeave>
								</Scripts>
							</Frame>
							<Frame name="PetDamageFrame" inherits="StatFrameTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="PetAttackPowerFrame" relativePoint="BOTTOMLEFT">
										<Offset>
											<AbsDimension x="0" y="-1"/>
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnEnter>
										CharacterDamageFrame_OnEnter(self);
									</OnEnter>
									<OnLeave>
										GameTooltip:Hide();
									</OnLeave>
								</Scripts>
							</Frame>
							<Frame name="PetSpellDamageFrame" inherits="StatFrameTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="PetDamageFrame" relativePoint="BOTTOMLEFT">
										<Offset>
											<AbsDimension x="0" y="-1"/>
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnEnter>
										PaperDollStatTooltip(self, "pet");
									</OnEnter>
									<OnLeave>
										GameTooltip:Hide();
									</OnLeave>
								</Scripts>
							</Frame>
							<Frame name="PetArmorFrame" inherits="StatFrameTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="PetSpellDamageFrame" relativePoint="BOTTOMLEFT">
										<Offset>
											<AbsDimension x="0" y="-1"/>
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnEnter>
										PaperDollStatTooltip(self, "pet");
									</OnEnter>
									<OnLeave>
										GameTooltip:Hide();
									</OnLeave>
								</Scripts>
							</Frame>
						</Frames>
					</Frame>
					<Frame name="PetResistanceFrame">
						<Size>
							<AbsDimension x="32" y="160"/>
						</Size>
						<Anchors>
							<Anchor point="TOPRIGHT" relativeTo="PetPaperDollFrame" relativePoint="TOPLEFT">
								<Offset>
									<AbsDimension x="347" y="-77"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Frames>
							<Frame name="PetMagicResFrame1" inherits="MagicResistanceFrameTemplate" id="6">
								<Anchors>
									<Anchor point="TOP"/>
								</Anchors>
								<Layers>
									<Layer level="BACKGROUND">
										<Texture file="Interface\PaperDollInfoFrame\UI-Character-ResistanceIcons">
											<TexCoords left="0" right="1.0" top="0.2265625" bottom="0.33984375"/>
										</Texture>
										<FontString name="PetMagicResText1" inherits="GameFontHighlightSmall" text="X">
											<Anchors>
												<Anchor point="BOTTOM">
													<Offset>
														<AbsDimension x="0" y="3"/>
													</Offset>
												</Anchor>
											</Anchors>
										</FontString>
									</Layer>
								</Layers>
							</Frame>
							<Frame name="PetMagicResFrame2" inherits="MagicResistanceFrameTemplate" id="2">
								<Anchors>
									<Anchor point="TOP" relativeTo="PetMagicResFrame1" relativePoint="BOTTOM"/>
								</Anchors>
								<Layers>
									<Layer level="BACKGROUND">
										<Texture file="Interface\PaperDollInfoFrame\UI-Character-ResistanceIcons">
											<TexCoords left="0" right="1.0" top="0" bottom="0.11328125"/>
										</Texture>
										<FontString name="PetMagicResText2" inherits="GameFontHighlightSmall" text="X">
											<Anchors>
												<Anchor point="BOTTOM">
													<Offset>
														<AbsDimension x="0" y="3"/>
													</Offset>
												</Anchor>
											</Anchors>
										</FontString>
									</Layer>
								</Layers>
							</Frame>
							<Frame name="PetMagicResFrame3" inherits="MagicResistanceFrameTemplate" id="3">
								<Anchors>
									<Anchor point="TOP" relativeTo="PetMagicResFrame2" relativePoint="BOTTOM"/>
								</Anchors>
								<Layers>
									<Layer level="BACKGROUND">
										<Texture file="Interface\PaperDollInfoFrame\UI-Character-ResistanceIcons">
											<TexCoords left="0" right="1.0" top="0.11328125" bottom="0.2265625"/>
										</Texture>
										<FontString name="PetMagicResText3" inherits="GameFontHighlightSmall" text="X">
											<Anchors>
												<Anchor point="BOTTOM">
													<Offset>
														<AbsDimension x="0" y="3"/>
													</Offset>
												</Anchor>
											</Anchors>
										</FontString>
									</Layer>
								</Layers>
							</Frame>
							<Frame name="PetMagicResFrame4" inherits="MagicResistanceFrameTemplate" id="4">
								<Anchors>
									<Anchor point="TOP" relativeTo="PetMagicResFrame3" relativePoint="BOTTOM"/>
								</Anchors>
								<Layers>
									<Layer level="BACKGROUND">
										<Texture file="Interface\PaperDollInfoFrame\UI-Character-ResistanceIcons">
											<TexCoords left="0" right="1.0" top="0.33984375" bottom="0.453125"/>
										</Texture>
										<FontString name="PetMagicResText4" inherits="GameFontHighlightSmall" text="X">
											<Anchors>
												<Anchor point="BOTTOM">
													<Offset>
														<AbsDimension x="0" y="3"/>
													</Offset>
												</Anchor>
											</Anchors>
										</FontString>
									</Layer>
								</Layers>
							</Frame>
							<Frame name="PetMagicResFrame5" inherits="MagicResistanceFrameTemplate" id="5">
								<Anchors>
									<Anchor point="TOP" relativeTo="PetMagicResFrame4" relativePoint="BOTTOM"/>
								</Anchors>
								<Layers>
									<Layer level="BACKGROUND">
										<Texture file="Interface\PaperDollInfoFrame\UI-Character-ResistanceIcons">
											<TexCoords left="0" right="1.0" top="0.453125" bottom="0.56640625"/>
										</Texture>
										<FontString name="PetMagicResText5" inherits="GameFontHighlightSmall" text="X">
											<Anchors>
												<Anchor point="BOTTOM">
													<Offset>
														<AbsDimension x="0" y="3"/>
													</Offset>
												</Anchor>
											</Anchors>
										</FontString>
									</Layer>
								</Layers>
							</Frame>
						</Frames>
					</Frame>
				</Frames>
			</Frame>
			<Frame name="PetPaperDollFrameCompanionFrame" setAllPoints="true" enableMouse="true" id="2" hidden="true">
				<HitRectInsets>
					<AbsInset left="0" right="30" top="0" bottom="75"/>
				</HitRectInsets>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture file="Interface\PetPaperDollFrame\UI-PetFrame-Slots">
							<Size>
								<AbsDimension x="338" y="128"/>
							</Size>
							<Anchors>
								<Anchor point="BOTTOMLEFT">
									<Offset>
										<AbsDimension x="13" y="79"/>
									</Offset>
								</Anchor>
							</Anchors>
							<TexCoords left="0.009765625" right="0.66015625" top="0.0" bottom="1.0"/>
						</Texture>
						<Texture file="Interface\PetPaperDollFrame\UI-PetFrame-Frame">
							<Size>
								<AbsDimension x="320" y="235"/>
							</Size>
							<Anchors>
								<Anchor point="CENTER">
									<Offset>
										<AbsDimension x="-8" y="64"/>
									</Offset>
								</Anchor>
							</Anchors>
							<TexCoords left="0.0" right="0.6171875" top="0.0" bottom="0.890625"/>
						</Texture>
						<FontString name="CompanionPageNumber" inherits="GameFontHighlightSmallOutline">
							<Anchors>
								<Anchor point="CENTER">
									<Offset>
										<AbsDimension x="-13" y="-155"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
						
					</Layer>
					<Layer level="ARTWORK">
						<FontString name="CompanionSelectedName" inherits="DialogButtonNormalText">
							<Anchors>
								<Anchor point="CENTER">
									<Offset>
										<AbsDimension x="-13" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Frames>
					<DressUpModel name="CompanionModelFrame">
						<Size>
							<AbsDimension x="288" y="160"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset>
									<AbsDimension x="39" y="-90"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								Model_OnLoad(self);
								self:RegisterEvent("DISPLAY_SIZE_CHANGED");
							</OnLoad>
							<OnEvent>
								self:RefreshUnit();
							</OnEvent>
							<OnUpdate>
		                        Model_OnUpdate(self, elapsed);
		                    </OnUpdate>
						</Scripts>
						<Frames>
							<Button name="CompanionModelFrameRotateLeftButton">
								<Size>
									<AbsDimension x="35" y="35"/>
								</Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="PetPaperDollFrame">
										<Offset>
											<AbsDimension x="35" y="-88"/>
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self:RegisterForClicks("LeftButtonDown", "LeftButtonUp");
									</OnLoad>
									<OnClick>
										Model_RotateLeft(CompanionModelFrame);
									</OnClick>
								</Scripts>
								<NormalTexture file="Interface\Buttons\UI-RotationLeft-Button-Up"/>
								<PushedTexture file="Interface\Buttons\UI-RotationLeft-Button-Down"/>
								<HighlightTexture file="Interface\Buttons\ButtonHilight-Round" alphaMode="ADD"/>
							</Button>
							<Button name="CompanionModelFrameRotateRightButton">
								<Size>
									<AbsDimension x="35" y="35"/>
								</Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="CompanionModelFrameRotateLeftButton" relativePoint="TOPRIGHT"/>
								</Anchors>
								<Scripts>
									<OnLoad>
										self:RegisterForClicks("LeftButtonDown", "LeftButtonUp");
									</OnLoad>
									<OnClick>
										Model_RotateRight(CompanionModelFrame);
									</OnClick>
								</Scripts>
								<NormalTexture file="Interface\Buttons\UI-RotationRight-Button-Up"/>
								<PushedTexture file="Interface\Buttons\UI-RotationRight-Button-Down"/>
								<HighlightTexture file="Interface\Buttons\ButtonHilight-Round" alphaMode="ADD"/>
							</Button>
						</Frames>
					</DressUpModel>
					<Button name="CompanionSummonButton" inherits="GameMenuButtonTemplate" text="SUMMON">
						<Size>
							<AbsDimension x="150" y="25"/>
						</Size>
						<Anchors>
							<Anchor point="CENTER">
								<Offset>
									<AbsDimension x="-13" y="-25"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnClick>
								CompanionSummonButton_OnClick();
							</OnClick>
						</Scripts>
					</Button>
					<CheckButton name="CompanionButton1" inherits="CompanionButtonTemplate" id="1">
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset>
									<AbsDimension x="60" y="-316"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="CompanionButton2" inherits="CompanionButtonTemplate" id="2">
						<Anchors>
							<Anchor point="LEFT" relativeTo="CompanionButton1" relativePoint="RIGHT">
								<Offset>
									<AbsDimension x="4" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="CompanionButton3" inherits="CompanionButtonTemplate" id="3">
						<Anchors>
							<Anchor point="LEFT" relativeTo="CompanionButton2" relativePoint="RIGHT">
								<Offset>
									<AbsDimension x="4" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="CompanionButton4" inherits="CompanionButtonTemplate" id="4">
						<Anchors>
							<Anchor point="LEFT" relativeTo="CompanionButton3" relativePoint="RIGHT">
								<Offset>
									<AbsDimension x="4" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="CompanionButton5" inherits="CompanionButtonTemplate" id="5">
						<Anchors>
							<Anchor point="LEFT" relativeTo="CompanionButton4" relativePoint="RIGHT">
								<Offset>
									<AbsDimension x="4" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="CompanionButton6" inherits="CompanionButtonTemplate" id="6">
						<Anchors>
							<Anchor point="LEFT" relativeTo="CompanionButton5" relativePoint="RIGHT">
								<Offset>
									<AbsDimension x="4" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="CompanionButton7" inherits="CompanionButtonTemplate" id="7">
						<Anchors>
							<Anchor point="TOP" relativeTo="CompanionButton1" relativePoint="BOTTOM">
								<Offset>
									<AbsDimension x="0" y="-5"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="CompanionButton8" inherits="CompanionButtonTemplate" id="8">
						<Anchors>
							<Anchor point="LEFT" relativeTo="CompanionButton7" relativePoint="RIGHT">
								<Offset>
									<AbsDimension x="4" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="CompanionButton9" inherits="CompanionButtonTemplate" id="9">
						<Anchors>
							<Anchor point="LEFT" relativeTo="CompanionButton8" relativePoint="RIGHT">
								<Offset>
									<AbsDimension x="4" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="CompanionButton10" inherits="CompanionButtonTemplate" id="10">
						<Anchors>
							<Anchor point="LEFT" relativeTo="CompanionButton9" relativePoint="RIGHT">
								<Offset>
									<AbsDimension x="4" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="CompanionButton11" inherits="CompanionButtonTemplate" id="11">
						<Anchors>
							<Anchor point="LEFT" relativeTo="CompanionButton10" relativePoint="RIGHT">
								<Offset>
									<AbsDimension x="4" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="CompanionButton12" inherits="CompanionButtonTemplate" id="12">
						<Anchors>
							<Anchor point="LEFT" relativeTo="CompanionButton11" relativePoint="RIGHT">
								<Offset>
									<AbsDimension x="4" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<Button name="CompanionPrevPageButton">
						<Size>
							<AbsDimension x="32" y="32"/>
						</Size>
						<Anchors>
							<Anchor point="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="110" y="83"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnClick>
								PetPaperDollFrame_SetCompanionPage((PetPaperDollFrameCompanionFrame.mode=="MOUNT" and PetPaperDollFrameCompanionFrame.pageMount or PetPaperDollFrameCompanionFrame.pageCritter) - 1);
							</OnClick>
						</Scripts>
						<NormalTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Up"/>
						<PushedTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Down"/>
						<DisabledTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Disabled"/>
						<HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
					</Button>
					<Button name="CompanionNextPageButton">
						<Size>
							<AbsDimension x="32" y="32"/>
						</Size>
						<Anchors>
							<Anchor point="LEFT" relativeTo="CompanionPrevPageButton" relativePoint="RIGHT">
								<Offset>
									<AbsDimension x="80" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnClick>
								PetPaperDollFrame_SetCompanionPage(((PetPaperDollFrameCompanionFrame.mode=="MOUNT" and PetPaperDollFrameCompanionFrame.pageMount or PetPaperDollFrameCompanionFrame.pageCritter) or 0)+ 1);
							</OnClick>
						</Scripts>
						<NormalTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Up"/>
						<PushedTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Down"/>
						<DisabledTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Disabled"/>
						<HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
					</Button>
				</Frames>
				<Scripts>
					<OnShow>
						PetPaperDollFrame_UpdateCompanionPreview();
					</OnShow>
				</Scripts>
			</Frame>
			<Button name="PetPaperDollFrameTab1" inherits="TabButtonTemplate" text="PET" id="1">
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="70" y="-39"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						PanelTemplates_TabResize(self, 0);
						getglobal(self:GetName().."HighlightTexture"):SetWidth(self:GetTextWidth() + 31);
						self:SetFrameLevel(PetPaperDollFrameCompanionFrame:GetFrameLevel()+1);
					</OnLoad>
					<OnClick>
						PetPaperDollFrame_SetTab(1);
					</OnClick>
				</Scripts>
			</Button>
			<Button name="PetPaperDollFrameTab2" inherits="TabButtonTemplate" text="COMPANIONS" id="2">
				<Anchors>
					<Anchor point="LEFT" relativeTo="PetPaperDollFrameTab1" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						PanelTemplates_TabResize(self, 0);
						getglobal(self:GetName().."HighlightTexture"):SetWidth(self:GetTextWidth() + 31);
						self:SetFrameLevel(PetPaperDollFrameCompanionFrame:GetFrameLevel()+1);
					</OnLoad>
					<OnClick>
						PetPaperDollFrame_SetTab(2);
					</OnClick>
				</Scripts>
			</Button>
			<Button name="PetPaperDollFrameTab3" inherits="TabButtonTemplate" text="MOUNTS" id="3">
				<Anchors>
					<Anchor point="LEFT" relativeTo="PetPaperDollFrameTab2" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						PanelTemplates_TabResize(self, 0);
						getglobal(self:GetName().."HighlightTexture"):SetWidth(self:GetTextWidth() + 31);
						self:SetFrameLevel(PetPaperDollFrameCompanionFrame:GetFrameLevel()+1);
					</OnLoad>
					<OnClick>
						PetPaperDollFrame_SetTab(3);
					</OnClick>
				</Scripts>
			</Button>
			
		</Frames>
		<Scripts>
			<OnLoad>
				PetPaperDollFrame_OnLoad(self);
			</OnLoad>
			<OnEvent>
				PetPaperDollFrame_OnEvent(self, event, ...);
			</OnEvent>
			<OnShow>
				PetPaperDollFrame_OnShow(self)
			</OnShow>
			<OnHide>
				PetPaperDollFrame_OnHide(self);
			</OnHide>
		</Scripts>
	</Frame>
</Ui>
